package com.dapeis.core.web.directive;
import com.ag.web.freemarker.directive.BaseTemplateDirectiveModel;

//@Component("dou2b")
public class StylistTemplateDirectiveModel extends BaseTemplateDirectiveModel {

    /**
     * 页面直接调用 java 方法 private static final String INF_TYPE = "INF_type"; final
     * Logger logger = LoggerFactory.getLogger(getClass());
     * 
     * @SuppressWarnings({ "unchecked", "rawtypes" })
     * @Override public void execute(Environment env, Map params,
     *           TemplateModel[] loopVars, TemplateDirectiveBody body) throws
     *           TemplateException, IOException {
     * 
     *           String cmd = DirectiveUtils.getString("cmd", params); Map
     *           paramWarp = new HashMap(params); boolean pass = true; if
     *           (StringUtils.isBlank(cmd)) {
     * 
     *           } else if (StringUtils.equals(cmd, INF_TYPE)) {
     *           InformationTypeService informationTypeService = SpringUtils
     *           .getBean(InformationTypeService.class); List<InformationType>
     *           list = informationTypeService.selectAll();
     *           paramWarp.put("m_list",
     *           ObjectWrapper.DEFAULT_WRAPPER.wrap(list)); }
     * 
     *           Map origWarp = DirectiveUtils.addParamsToVariable(env,
     *           paramWarp); if (pass && body != null) {
     *           body.render(env.getOut()); }
     *           DirectiveUtils.removeParamsFromVariable(env, paramWarp,
     *           origWarp); }
     **/
}
